package com.nbcio.modules.crm.contract.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * CRM合同实体
 */
@Data
@TableName("crm_contract")
public class CrmContract {
    @TableId
    private Long contractId;
    private String contractNo;
    private String contractName;
    private Long customerId;
    private Long contactId;
    private Long opportunityId;
    private String contractType; // SALES/SERVICE/MAINTENANCE
    private BigDecimal amount;
    private BigDecimal signedAmount;
    private LocalDate signedDate;
    private LocalDate startDate;
    private LocalDate endDate;
    private Long ownerUserId;
    private Long ownerDeptId;
    private String paymentTerms;
    private String deliveryTerms;
    private String attachmentIds; // 附件ID列表(逗号分隔)
    private String status; // DRAFT/SUBMITTED/APPROVING/APPROVED/EXECUTING/COMPLETED/TERMINATED
    private String procInsId; // 流程实例ID
    private String remark;
    private Long createBy;
    private LocalDateTime createTime;
    private Long updateBy;
    private LocalDateTime updateTime;
    private Long createDept;
    private String tenantId;
}


